package com.weixing.mall.provider.api.model.enums;

import com.weixing.mall.base.enums.IBaseEnum;
import lombok.NoArgsConstructor;

/**
 * 代理等级
 *
 * @author  kfc
 * @date  2019/9/9 16:00
 * @since v1.0
 */
@NoArgsConstructor
public enum AgentLevelEnum implements IBaseEnum<Integer> {
    KEFU(0,"客服","客服",0,null),
    DEALER(1,"经销商","经销",1<<5,AgentRebateRuleEnum.RULE32),
    LEVEL_1(2,"一级代理","一代",1<<4,AgentRebateRuleEnum.RULE16),
    LEVEL_2(3,"二级代理","二代",1<<3,AgentRebateRuleEnum.RULE8),
    LEVEL_3(4,"三级代理","三代",1<<2,AgentRebateRuleEnum.RULE4),
    LEVEL_4(5,"四级代理","四代",1<<1,AgentRebateRuleEnum.RULE2),
    LEVEL_5(6,"五级代理","五代",1,AgentRebateRuleEnum.RULE1),
    ;
    private int value;
    private String desp;
    private int code;
    private String shortName;
    private AgentRebateRuleEnum rebateRule;

    AgentLevelEnum(int value, String desp,String shortName,int code,AgentRebateRuleEnum rebateRule) {
        this.value = value;
        this.desp = desp;
        this.code = code;
        this.shortName = shortName;
        this.rebateRule = rebateRule;
    }

    @Override
    public Integer getValue() {
        return value;
    }

    public void setValue(int value) {
        this.value = value;
    }

    @Override
    public String getDesp() {
        return desp;
    }

    public void setDesp(String desp) {
        this.desp = desp;
    }

    public AgentRebateRuleEnum getRebateRule() {
        return rebateRule;
    }

    public void setRebateRule(AgentRebateRuleEnum rebateRule) {
        this.rebateRule = rebateRule;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }


    public String getShortName() {
        return shortName;
    }

    public void setShortName(String shortName) {
        this.shortName = shortName;
    }
}
